//    Copyright (C) Kherty.  All rights reserved.
using System;
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing
{
    public class TextUnderlineLine : IOfficeXmlSerializable
    {
        private TextUnderlineLineFollowText uLnTx;

        public TextUnderlineLineFollowText TextUnderlineLineFollowText
        {
            get { return uLnTx; }
            set { uLnTx = value; }
        }

        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            throw new NotImplementedException();
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            if (TextUnderlineLineFollowText != null)
            {
                context.WriteElement(TextUnderlineLineFollowText);
                return;
            }
            throw new NotImplementedException();
        }

        #endregion

        internal static TextUnderlineLine ReadTextUnderlineLine(ReadContext cc)
        {
            switch (cc.ReaderLocalName)
            {
                case "uLnTx":
                    TextUnderlineLineFollowText u = cc.ReadElement<TextUnderlineLineFollowText>();
                    TextUnderlineLine result = new TextUnderlineLine();
                    result.TextUnderlineLineFollowText = u;
                    return result;
                case "uLn":
                    throw new NotImplementedException();
                default:
                    return null;
            }
        }
    }
}